Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Adds action to add log rate analysis to a case #201549

Merged
merged 17 commits into from
Dec 2, 2024

Conversation

rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Nov 25, 2024

Summary

Follow up to #197247

Adds action to add Log Rate Analysis Embeddable to a case.

Screen.Recording.2024-11-26.at.14.06.37.mov

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@peteharverson peteharverson changed the title add attachment to a case [ML] Adds action to add log rate analysis to a case Nov 25, 2024
@rbrtj rbrtj self-assigned this Nov 26, 2024
@rbrtj rbrtj added release_note:enhancement :ml v9.0.0 Team:ML Team label for ML (also use :ml) Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis backport:version Backport to applied version labels v8.18.0 labels Nov 26, 2024
@rbrtj rbrtj marked this pull request as ready for review November 26, 2024 13:56
@rbrtj rbrtj requested a review from a team as a code owner November 26, 2024 13:56
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@rbrtj rbrtj requested a review from a team as a code owner November 26, 2024 15:19
@rbrtj rbrtj requested a review from a team as a code owner November 27, 2024 10:26
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is looking good. Just left a few comments.

@rbrtj rbrtj requested a review from peteharverson November 27, 2024 12:32
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested latest changes and LGTM

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great update, LGTM!

Just one thing: Maybe we could move the cases functional test to a separate file log_rate_analysis_cases_embeddable.ts - so if part of either suite fails not everything will be skipped.

const caseAttachmentTooltipContent = useMemo(() => {
if (!showLogRateAnalysisResults) {
return i18n.translate('xpack.aiops.logRateAnalysis.attachToCaseTooltipNoAnalysis', {
defaultMessage: 'Run the analysis first to add results to a case',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defaultMessage: 'Run the analysis first to add results to a case',
defaultMessage: 'Run the analysis first to add results to a case.',

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in: #33d5e29

}
if (significantItems.length === 0) {
return i18n.translate('xpack.aiops.logRateAnalysis.attachToCaseTooltipNoResults', {
defaultMessage: 'Cannot add to case because the analysis did not produce any results',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defaultMessage: 'Cannot add to case because the analysis did not produce any results',
defaultMessage: 'Cannot add to case because the analysis did not produce any results.',

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in: #33d5e29

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 627 620 -7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiops 589.6KB 613.9KB +24.3KB
dataVisualizer 614.8KB 614.8KB +39.0B
ml 4.7MB 4.7MB +16.0B
total +24.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
aiops 16.2KB 17.3KB +1.1KB
Unknown metric groups

API count

id before after diff
@kbn/aiops-components 36 37 +1

async chunk count

id before after diff
aiops 38 40 +2

History

cc @rbrtj

@rbrtj rbrtj merged commit aa4c39c into elastic:main Dec 2, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12117919595

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
## Summary

Follow up to [elastic#197247](elastic#197247)

Adds action to add Log Rate Analysis Embeddable to a case.

https://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit aa4c39c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 2, 2024
…202431)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Adds action to add log rate analysis to a case
(#201549)](#201549)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-02T10:59:54Z","message":"[ML]
Adds action to add log rate analysis to a case (#201549)\n\n##
Summary\r\n\r\nFollow up to
[#197247](https://github.com/elastic/kibana/issues/197247)\r\n\r\nAdds
action to add Log Rate Analysis Embeddable to a
case.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"aa4c39c11955333176a612fd1b3601c34fcbc8ad","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","v9.0.0","Team:ML","Feature:ML/AIOps","backport:version","v8.18.0"],"title":"[ML]
Adds action to add log rate analysis to a
case","number":201549,"url":"https://github.com/elastic/kibana/pull/201549","mergeCommit":{"message":"[ML]
Adds action to add log rate analysis to a case (#201549)\n\n##
Summary\r\n\r\nFollow up to
[#197247](https://github.com/elastic/kibana/issues/197247)\r\n\r\nAdds
action to add Log Rate Analysis Embeddable to a
case.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"aa4c39c11955333176a612fd1b3601c34fcbc8ad"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201549","number":201549,"mergeCommit":{"message":"[ML]
Adds action to add log rate analysis to a case (#201549)\n\n##
Summary\r\n\r\nFollow up to
[#197247](https://github.com/elastic/kibana/issues/197247)\r\n\r\nAdds
action to add Log Rate Analysis Embeddable to a
case.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"aa4c39c11955333176a612fd1b3601c34fcbc8ad"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
## Summary

Follow up to [elastic#197247](elastic#197247)

Adds action to add Log Rate Analysis Embeddable to a case.



https://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

Follow up to [elastic#197247](elastic#197247)

Adds action to add Log Rate Analysis Embeddable to a case.



https://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:enhancement Team:ML Team label for ML (also use :ml) v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants